
#include <sys/time.h>
#include "common.h"


namespace datashuttle
{
long long timenow()
{
	struct timeval t;
	gettimeofday(&t,0);//
	return ((long long)t.tv_sec) * 1000 + ((long long)t.tv_usec)/1000;
//	struct timespec t;
//	sys_clock_gettime( CLOCK_MONOTONIC, &t );
//	return ((long long)t.tv_sec)*1000 + ((long long)t.tv_nsec)/1000000;
}
}//namespace datashuttle


